package feesmodule.domain;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table(name="PROGRAM")
public class Program implements Serializable
{
    @Id
    @Column(name="RPOGRAM_ID")
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private int id;

    @Column(name="PROGRAM_NAME")
    private String programName;
    @OneToMany(mappedBy="requestProgram")
    private List<Program> qualifictationPrograms;
    @ManyToOne
    @JoinColumn(name="REQUEST_PROGRAM_ID")
    private Program requestProgram;
    @OneToOne(mappedBy="ownerProgram")
    private FeeData feeData;
    @OneToMany(mappedBy="program")
    private List<ProgramToSericeMapInfo> serviceMapping = new ArrayList<ProgramToSericeMapInfo>();
    // to remove
    /*@ManyToMany(mappedBy="programs")
    private Set<Service> services = new HashSet<Service>();*/
    /**
     * @return the id
     */
    public int getId() {
        return id;
    }

    /**
     * @param id the id to set
     */
    public void setId(int id) {
        this.id = id;
    }

    /**
     * @return the programName
     */
    public String getProgramName() {
        return programName;
    }

    /**
     * @param programName the programName to set
     */
    public void setProgramName(String programName) {
        this.programName = programName;
    }

    /**
     * @return the qualifictationPrograms
     */
    public List<Program> getQualifictationPrograms() {
        return qualifictationPrograms;
    }

    /**
     * @param qualifictationPrograms the qualifictationPrograms to set
     */
    public void setQualifictationPrograms(List<Program> qualifictationPrograms) {
        this.qualifictationPrograms = qualifictationPrograms;
    }

    /**
     * @return the requestProgram
     */
    public Program getRequestProgram() {
        return requestProgram;
    }

    /**
     * @param requestProgram the requestProgram to set
     */
    public void setRequestProgram(Program requestProgram) {
        this.requestProgram = requestProgram;
    }

    /**
     * @return the feeData
     */
    public FeeData getFeeData() {
        return feeData;
    }

    /**
     * @param feeData the feeData to set
     */
    public void setFeeData(FeeData feeData) {
        this.feeData = feeData;
    }

    /**
     * @return the serviceMapping
     */
    public List<ProgramToSericeMapInfo> getServiceMapping() {
        return serviceMapping;
    }

    /**
     * @param serviceMapping the serviceMapping to set
     */
    public void setServiceMapping(List<ProgramToSericeMapInfo> serviceMapping) {
        this.serviceMapping = serviceMapping;
    }

    /**
     * @return the services
     */
  //  public Set<Service> getServices() {
  //      return services;
  //  }

    /**
     * @param services the services to set
     */
   // public void setServices(Set<Service> services) {
    //    this.services = services;
   // }
    

}
